package org.fujene.memman.backup;

import java.util.ArrayList;
import java.util.concurrent.Callable;

import org.fujene.memman.ReplicateMemoryManager;
import org.fujene.structure.Queue;

public class ContentSnapshoter implements Callable<ArrayList<Queue>>{
	private ReplicateMemoryManager manager;
	private long hashFrom, hashTo;
	private int targetIndex;
	
	public ContentSnapshoter(ReplicateMemoryManager manager, long targethashFrom, long targetHashTo, int targetIndex){
		this.manager = manager;
		this.hashFrom = targethashFrom;
		this.hashTo = targetHashTo;
		this.targetIndex = targetIndex;
	}
	
	@Override
	public ArrayList<Queue> call() throws Exception{
		ArrayList<Queue> returner = manager.getContentList(hashFrom, hashTo, targetIndex);
		return returner;
	}
}
